#ifndef LRCPAGE_H
#define LRCPAGE_H

#include <QWidget>
#include<QPropertyAnimation>
#include<QVector>
struct LrcWorldLine
{
    LrcWorldLine(qint64 time,QString text)
        :time(time)
        ,text(text)
    {}
    qint64 time;
    QString text;
};

namespace Ui {
class LrcPage;
}

class LrcPage : public QWidget
{
    Q_OBJECT

public:
    explicit LrcPage(QWidget *parent = nullptr);
    bool parseLrc(const QString& Path);
    int getLineWordIndex(qint64 time);
    QString getlineWordbyIndex(qint64 index);
    void showLrcWord(int time);
    ~LrcPage();

private:
    Ui::LrcPage *ui;
    QPropertyAnimation* animation;
    QVector<LrcWorldLine> musicLrcwords;
};

#endif // LRCPAGE_H
